package com.nchu.service;

import com.nchu.pojo.Filter;
import com.nchu.pojo.OrderComplain;
import com.nchu.pojo.OrderForm;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;


public interface OrderService {

    //根据查询所有
    List<OrderForm> FindAllbyid(int userid);


    //根据用户id查找自己接取的订单Find and pick up orders
    List<OrderForm> FindPickUpOrdersByid(int userid);


    //根据id和状态查询订单
    List<OrderForm> FindAllbyidandstatus(int userid,int status);


    //根据用户id和状态查找订单(用于查接单)
    List<OrderForm> FindAllbyreceiveUserandstatus(int userid,int status);



    public int addOrder(OrderForm orderForm);

    List<OrderComplain> Qurry(int complainantid);

    //该方法用于被投诉人查看自己被举报了多少条
    List<OrderComplain> Find(int respondentid);

    //新增一条举报信息
    int AddComplain(int orderid,int complainantid,int respondentid,String complain);

    //修改一条记录
    int changebyid(int orderid,String remark,int status);

    public int InsertOrderReceivingUserAndChangeOrderStatus(int orderID, int userID);

    //根据订单号查找订单
    OrderForm FindByOrderid(int orderid);

    List<OrderComplain> queryByOrderId(int orderid);
    List<OrderForm> queryAllOrderForms();

    List<OrderForm> queryOrderFormsByLimit(Filter filter);
    OrderForm findone(int orderid);

//    User popup(int orderid);

    //删除订单通过订单号（逻辑删除）
    int deletebyorderid(int orderid);


    //完成订单操作
    int finishorder(int orderid);


    int updataOrderTransationstatus(int orderid);


    int updatacomplainstatus(int orderid);

}
